﻿using System;
using System.Html.DOM;

namespace App
{
    public class Main
    {
        public void Do()
        {
            DataSample d = new DataSample();
            

            Delete.Del(d.x);
        }

        public void ArrayFunc()
        {
            var ok = new int[0];
            var ok2 = new int[3] { 1, 2, 3 };
            var okn = new int[2][] { new int[] { 1, 2 }, new int[] { 1 } };
            var x = okn[0][0];


            //var x = new int[3][];
            var y = new int[2, 3] { { 1, 2, 3 }, { 1, 2, 3 } };
            int[,] m = new int[7, 8];
            var a = new int[,] { { 1, 2, 3 }, { 1, 2, 3 } };

            var ele = y[1, 2];
        }
    }


    //This class will not compile to js file. but you can use it as a strong data type.
    //e.g. in some method(below is C#):
    //    var d = result as DataSample;
    //    int c = d.x;
    //it will compile to(below is JS):
    //    var d = result;
    //    int c = d.x;
    //above is valid js code.
    //but you can not use it to create object -- var x = new DataSample() in C# is not correct,
    // it will translate to var x = new DataSample() in js, since the class is not compile to js.
    [NoCompile]
    public class DataSample
    {
        public int x;
        public int y;
    }
}
